const mongoose = require('mongoose')
const model = mongoose.model('articles', new mongoose.Schema({

    name: { type: String },
    parent: [{ type: mongoose.Schema.Types.ObjectId, ref: 'categories'}],
    body: { type: String },

},
//第二个参数，设置Schema
{ 
    //开启时间戳，在加入数据的时候会自动加个加入时间
    timestamps:true
}
))
module.exports = model  